package com.define.ssh.model;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "tb_role_func")
public class RoleFunc implements Serializable {
	private static final long serialVersionUID = -6109590619136943216L;
	private Func func;// 功能
	private Role role;// 角色

	@Id
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(nullable = false, name = "func_id")
	public Func getFunc() {
		return func;
	}

	public void setFunc(Func func) {
		this.func = func;
	}

	@Id
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(nullable = false, name = "role_id")
	public Role getRole() {
		return role;
	}

	public void setRole(Role role) {
		this.role = role;
	}
}
